--InSbox-2-set
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity InSbox2set is
    Port ( si : in  STD_LOGIC_VECTOR (127 downto 0);
		so : out  STD_LOGIC_VECTOR (127 downto 0));
end InSbox2set;

architecture Behavioral of InSbox2set is
component InSbox2 is
    Port ( i : in  STD_LOGIC_VECTOR (4 DOWNTO 0);
           o : out  STD_LOGIC_VECTOR (4 DOWNTO 0));
end component InSbox2; 
	   
signal n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13, n14, n15, n16, n17, n18, n19, n20, n21, n22, n23, n24, n25, n26, n27, n28, n29, n30, n31, n32 : STD_LOGIC_VECTOR (4 downto 0);
begin
b1: InSbox2 port map (si(3 downto 0), n32);	 
b2: InSbox2 port map (si(7 downto 4), n31);
b3: InSbox2 port map (si(11 downto 8), n30);
b4: InSbox2 port map (si(15 downto 12), n29);
b5: InSbox2 port map (si(19 downto 16), n28);
b6: InSbox2 port map (si(23 downto 20), n27);
b7: InSbox2 port map (si(27 downto 24), n26);
b8: InSbox2 port map (si(31 downto 28), n25);
b9: InSbox2 port map (si(35 downto 32), n24);
b10: InSbox2 port map (si(39 downto 36), n23);
b11: InSbox2 port map (si(43 downto 40), n22);
b12: InSbox2 port map (si(47 downto 44), n21);
b13: InSbox2 port map (si(51 downto 48), n20);
b14: InSbox2 port map (si(55 downto 52), n19);
b15: InSbox2 port map (si(59 downto 56), n18);
b16: InSbox2 port map (si(63 downto 60), n17);
b17: InSbox2 port map (si(67 downto 64), n16);
b18: InSbox2 port map (si(71 downto 68), n15);
b19: InSbox2 port map (si(75 downto 72), n14);
b20: InSbox2 port map (si(79 downto 76), n13);
b21: InSbox2 port map (si(83 downto 80), n12);
b22: InSbox2 port map (si(87 downto 84), n11);
b23: InSbox2 port map (si(91 downto 88), n10);
b24: InSbox2 port map (si(95 downto 92), n9);
b25: InSbox2 port map (si(99 downto 96), n8);
b26: InSbox2 port map (si(103 downto 100), n7);
b27: InSbox2 port map (si(107 downto 104), n6);
b28: InSbox2 port map (si(111 downto 108), n5);
b29: InSbox2 port map (si(115 downto 112), n4);
b30: InSbox2 port map (si(119 downto 116), n3);
b31: InSbox2 port map (si(123 downto 120), n2);
b32: InSbox2 port map (si(127 downto 124), n1);
so <= n1&n2&n3&n4&n5&n6&n7&n8&n9&n10&n11&n12&n13&n14&n15&n16&n17&n18&n19&n20&n21&n22&n23&n24&n25&n26&n27&n28&n29&n30&n31&n32;
end Behavioral;